package lab03.Test01;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class test {
    public static void main(String[] args) {
        BufferedWriter writer=null;
        String path="D:\\hello.txt";
        try {
            writer=new BufferedWriter(new FileWriter(path));
            writer.write("hello,world!");
            writer.newLine();
            writer.write("1010111000");
            writer.newLine();
            writer.write("bye!!!!!");
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            try {

                writer.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

    }
}
